package com.ophiux.wechat.db;

import java.util.HashMap;
import java.util.Map;

/**
 * 授权信息
 * @author chenh
 *
 */
public class AUTH_MAP {

	/**
	 * key:商户号
	 * value:商户模型
	 */
	public static Map Auth_App_Map = new HashMap<String,MchAppModel>();
	static{
		/**
		 * 2018-06-15 陈辉新增
		 * 南充身心
		 */
		MchAppModel mch = new MchAppModel();
		mch.setMch_id("");
		mch.setAppid("wx89593e140fa7b55c");
		mch.setAppsecret("376ae523621f8a60b3a3a9334e5767ea");
		mch.setApi_key("");
		Auth_App_Map.put("ncsyyy-gBmk-tlsOp-180615", mch);
	}
	
	/**
	 * 通过token获取商户信息
	 * @param mch_id   商户号
	 * @return
	 */
	public static MchAppModel getAppModelByToken(String token){
		
		MchAppModel mchModel = null;
		try {
			mchModel = (MchAppModel) Auth_App_Map.get(token);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
		
		return mchModel;
		
	}
	
}
